from matplotlib import image as mpimg

img = mpimg.imread('img.png')
print(type(img))